package piece2.chapter10;

public class Student {
    private String major;

    public Student(Name name, String major) {
	super();
	this.major = major;
    }

    @Override
    public String toString() {
	return "Student [major=" + major + "]";
    }

    public String getMajor() {
	return major;
    }

    public void setMajor(String major) {
	this.major = major;
    }

    public int compareTo(String anotherString) {
	return major.compareTo(anotherString);
    }

}
